﻿
using System;
using System.Collections.Generic;
using System.Text;

namespace SharpSoft.Data
{
    using SharpSoft.Data.Expressions;
    using SharpSoft.Data.GSQL;
    public class MsSqlTextGenerator : SQLTextGenerator
    {
        protected override string ProcessExpression(BinaryExpression bin)
        {
            return base.ProcessExpression(bin);
        }
        protected override string ProcessExpression(FunctionExpression func)
        {
            string funcname = func.Name.ToLower();
            switch (funcname)
            {
                case "lastid":
                    return " @@IDENTITY";
                default:
                    return base.ProcessExpression(func);
            }
        }
    }
}
